/*加载完毕事件 在改事件中 写的js代码去获取dom元素 就一定不会出现找不到的问题*/
window.onload=function(){
	
	/*倒计时效果*/
	cutDownTime();

}
/*滚动效果*/


/*倒计时效果*/
function cutDownTime(){
	var totalHour=0;
	/*时间转化秒*/
	var totalSec=totalHour*60*60+1;
	var hour =document.querySelectorAll('.hour span');
	var minute =document.querySelectorAll('.minute span');
	var second =document.querySelectorAll('.second span');
	var timer = setInterval(function(){
		if(totalSec<=0){
			clearInterval(timer);
			//alert("活动已经结束");
			return;
		}
		totalSec--
		var hourTime=Math.floor(totalSec/3600);
		var minuteTime=Math.floor(totalSec%3600/60);
		var secondTime=totalSec%60;
		hour[0].innerHTML=Math.floor(hourTime/10);
		hour[1].innerHTML=hourTime%10;
		minute[0].innerHTML=Math.floor(minuteTime/10);
		minute[1].innerHTML=minuteTime%10;
		second[0].innerHTML=Math.floor(secondTime/10);
		second[1].innerHTML=secondTime%10;
	},1000);
}

